package com.atguigu.filter.servlet;


import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;
import java.io.PrintWriter;

@WebServlet(urlPatterns = "/private/ResServlet04")
public class ResServlet04 extends HttpServlet {
    @Override
    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("text/html;charset=utf-8");
        PrintWriter writer = response.getWriter();
        writer.write("<h1>私密资源 02</h1>");
        writer.write("春花秋月何时了？<br/>");
        writer.write("往事知多少？<br/>");
        writer.write("小楼昨夜又东风，故国不堪回首月明中。<br/>");
        writer.write("雕栏玉砌应犹在，只是朱颜改。<br/>");
        writer.write("问君能有几多愁？恰似一江春水向东流。<br/>");
        writer.write("<a href='/index.jsp'>回首页</a>");
    }
}
